package wells.memory;

import java.util.Random;
import java.util.Scanner;

public class PracticeMemory {
	public static void main(String[] args) throws InterruptedException {
		Random random = new Random();
		int length = 8;

		while (true) {
			for (int j = 0; j < 3; j++) {
				System.out.print(""+(3-j));
				Thread.sleep(500);
			}
			
			String str = "";
			for (int i = 0; i < length; i++) {
				int nextInt = random.nextInt(10);
				str += nextInt;
				Thread.sleep(1000);
				System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

				for (int j = 0; j <= i; j++) {
					System.out.print("==");
				}
				
				System.out.println(":" + nextInt);

			}
			Thread.sleep(2000);
			System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
			System.out.print("请输入：");
			Scanner input = new Scanner(System.in);

			String answer = input.next();
			System.out.println(str);
			System.out.println(answer+"("+(str.equals(answer)?"√":"×")+")");

			String continues = input.next();
			System.out.println("继续"+continues);
		}
	}
}
